package cn.datax.service.data.market.cata.feign.factory;

import cn.datax.service.data.market.cata.feign.UserResourceServiceFeign;
import cn.datax.service.data.market.cata.feign.fallback.UserResourceServiceFeignFallbackImpl;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class UserResourceServiceFeignFallbackFactory implements FallbackFactory<UserResourceServiceFeign> {

    @Override
    public UserResourceServiceFeign create(Throwable throwable) {
        UserResourceServiceFeignFallbackImpl dataApiServiceFeignFallback = new UserResourceServiceFeignFallbackImpl();
        dataApiServiceFeignFallback.setCause(throwable);
        return dataApiServiceFeignFallback;
    }
}
